﻿<%@ Page Title="" Language="C#" MasterPageFile="~/App_Masters/Default.Master" AutoEventWireup="true" CodeBehind="MemberList.aspx.cs" Inherits="Hutech.CRM.Web.Admin.MemberList" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="main" runat="server">
<span id="tabid" style="display: none">AdminMenu</span>

    <asp:Panel ID="pnlWrapper" runat="server" CssClass="panelwrapper admin rolemanager">
        <div class="modulecontent">
            <div class="catology-metro">
                <div class="left"><img class="ImageNomalHome-32" title="Home" src="../Resources/img/none-32.png" /></div>
                <asp:HyperLink ID="lnkAdminMenu" runat="server" NavigateUrl="~/Admin/AdminMenu.aspx" />&nbsp;&gt;
                <b><span id="spnTitle" runat="server"></span></b>
            </div>
            <asp:UpdatePanel ID="pnlMain" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
                <ContentTemplate>
                    <div class="settingrow settingrow-17">
                        <div>
                            <asp:TextBox ID="txtSearchUser" runat="server" CssClass="mediumtextbox" MaxLength="255" Width="300px"/>
	                        <%--<asp:ImageButton ID="ImageButtonSearchUser" CssClass="ImageButtonSearch-32 ImageButton" ImageUrl="~/Resources/img/none-32.png" runat="server" Text="Search" ToolTip="Tìm kiếm" />--%>
                            <mC:tsButton ID="btnSearchUser" runat="server" />
		                    <asp:HyperLink ID="lnkNewUser" runat="server" Visible="false" /> 
                        </div>
                        <br />
                        <div class="AspNet-GridView">	
	                        <table  cellspacing="0" width="100%">
		                        <thead>
		                            <tr>
			                            <th><asp:Label id="LableName" runat="server"></asp:Label></th>
			                            <th><asp:Label id="LableEmail" runat="server"></asp:Label></th>
			                            <th><asp:Label id="LableLoginName" runat="server"></asp:Label></th>
			                            <th></th>
		                            </tr>
                                </thead>
                                <tbody>
		                            <asp:Repeater id="rptUsers" runat="server" EnableViewState="False">
			                            <ItemTemplate>
				                            <tr>
					                            <td><asp:HyperLink ID="HyperLinkUserDetail" runat="server" NavigateUrl='<%# "UserAndPermission.aspx?userID="+Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "UserID").ToString())%>' Text='<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Name").ToString())%>' /></td>
					                            <td>
                                                    <a href='<%# "mailto:" + Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Email").ToString())%>'>
                                                        <%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Email").ToString())%>
                                                    </a>
                                                </td>
					                            <td><%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "LoginName").ToString())%></td>
					                            <td><asp:HyperLink ID="lnkRoleManager" runat="server" NavigateUrl='<%# "UserAndPermission.aspx?userID="+Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "UserID").ToString())%>' Text="Phân quyền" /></td>
				                            </tr>
			                            </ItemTemplate>
			                            <alternatingItemTemplate>
				                            <tr class="AspNet-GridView-Alternate">
					                            <td headers='<%# Resources.Resource.MemberListUserNameLabel.Replace(" ", "") %>'>
						                            <asp:HyperLink ID="HyperLinkUserDetail" runat="server" NavigateUrl='<%# "UserAndPermission.aspx?userID="+Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "UserID").ToString())%>' Text='<%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Name").ToString())%>' />
					                            </td>
					                            <td headers='<%# Resources.Resource.MemberListEmailLabel.Replace(" ", "") %>'>
					                                <a href='<%# "mailto:" + Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Email").ToString())%>'><%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "Email").ToString())%></a>
					                            </td>
					                            <td headers='<%# Resources.Resource.MemberListLoginNameLabel.Replace(" ", "") %>'> 
						                            <%# Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "LoginName").ToString())%>
					                            </td>
                                                <td><asp:HyperLink ID="lnkRoleManager" runat="server" NavigateUrl='<%# "UserAndPermission.aspx?userID="+Server.HtmlEncode(DataBinder.Eval(Container.DataItem, "UserID").ToString())%>' Text="Phân quyền" /></td>
				                            </tr>
			                            </AlternatingItemTemplate>
		                            </asp:Repeater>
                                </tbody>
	                        </table>
	                    </div>
        
                         <!-- Phan trang -------------------------->
                        <div style="margin:10px 0;  width:99%;">
                            <div style="float:right;">
                                <MyC:mojoCutePager ID="pgrItems" runat="server" />
                            </div>
                        </div>
                    </ContentTemplate>
                    <Triggers>
                        <asp:AsyncPostBackTrigger ControlID="btnSearchUser" EventName="Click" />
                        <%--<asp:AsyncPostBackTrigger ControlID="PopupAddUser1" EventName="ReloadData" />--%>
                        <asp:AsyncPostBackTrigger ControlID="pgrItems" EventName="Command" />
                    </Triggers>
                </asp:UpdatePanel>
                <asp:UpdateProgress ID="UpdateProgress1" runat="Server" AssociatedUpdatePanelID="pnlMain">
                    <ProgressTemplate >
                        <span style="margin:-5px 0 0 20px; position:absolute; background-color:Yellow;"><img src="../Resources/img/wait.gif" alt="Please wait" /> Please wait ...</span>
                    </ProgressTemplate>
                </asp:UpdateProgress>
            </div>
    </asp:Panel>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentLeft" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="contentRight" runat="server">
</asp:Content>
